/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Tema3;

import java.util.Scanner;

/**
 *
 * @author Alex
 */
public class minuscula2 {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
      Scanner teclado = new Scanner(System.in);
      String result=""; String cad=""; 
      String mayusculas = "ABCDEFGHIJKLMNÑOPQRSTUWXYZ";
      String minusculas = "abcdefghijklmnñopqrstuwxyz"; 
      System.out.print("Dime una letra y te dire si es mayuscula o minuscula:");
      String letra = teclado.next(); 
      for (int i = 0;
              i <mayusculas.length();i++) 
      { System.out.println(letra.charAt(0));
        if(mayusculas.charAt(i)==letra.charAt(0)){cad+=mayusculas.charAt(i);
        result="Mayuscula";}
        if(minusculas.charAt(i)==letra.charAt(0)){cad+=minusculas.charAt(i);
        result="Minuscula";} } 
      System.out.println("La letra "+cad+" es "+result+"."); 
    }
}
